<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head> 
    <meta charset="UTF-8">
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
    <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
    <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
   
    <script type="text/javascript">
    
	 $(document).ready(function(){
		 $(".showHtml").find("input,select").attr("disabled","disabled");
		 var form = $("#inputForm");  
	        form.validate();//验证指定的表单
	        	
	        	$("#okButton").click(function(){
	        		if (form.valid()) {//如果表单验证成功，则进行提交。  
	        		$("#showHtml").addClass("showHtml");
	                $("#okHead").show();
	                $("#createHead").hide();
	                $("#operateP").hide();
	                $('tr').find('td:eq(0)').hide();
	                $("tr").children('th').eq(0).hide();	
	            
	                return false;
	              }
	         });
	        	 
	    });
    
    
   
    </script> 
</head>
<body>
<form id="inputForm" name="inputForm">
<!-- 查看头部 -->   
<div id="createHead" class="layerHeader clearfix">
	<p class="headerTitle"><spring:message code="production_process_show"/></p>
    <div class="headerButton clearfix">       		 	
        <!-- 编辑按钮 -->
        <shiro:hasPermission name="produce:technology:edit">
	        <button type="button" onClick="window.location.href='${ctx}/produce/technology/edit?category=${process.processList[0].category}&procategory=${process.processList[0].procategory}'" >
	               <spring:message code="production_process_edit" />
	        </button>   	    	
       
    	</shiro:hasPermission>
    	<!-- 取消按钮 -->
        <button type="button" onclick="closeWin()"><spring:message code="purchaseContract_edit_cancle"/></button>
    </div>
</div>

<div id="showHtml" class="tabBoxSm">
<div class="tabSm smOrderBox">
	
	 <div class="clearfix">
	 	<div class="">        	
        		<div class="col-50 items clearfix haveToBox">
        		<!-- 工艺类别 -->            		
          			<p class="tit"><spring:message code="production_process_category"/></p>
                    <input id="procategory" name="procategory" style="border: none;color: #333;background-color: inherit;margin-left: 30px" disabled="true" value="${fns:getDictName(process.processList[0].procategory)}" >
        		</div>        
        		<div class="col-50 items clearfix haveToBox">
        		<!-- 款式类别 -->
            		<p class="tit"><spring:message code="production_process_style_category"/></p>
                   <input id="category" name="category" style="border: none;color: #333;background-color: inherit;margin-left: 30px" disabled="true" value="${fns:getDictName(process.processList[0].category)}"  >     
        		</div>        
    	</div>
</div> 
	<div class="" id="itemSub"> 
	  <div class="tableArea"> 	              	
        
				<div style="float: left;">
					<!-- 生产工艺  -->
					<p class="tit"><spring:message code="production_process_process"/></p>				
				</div>
				
		
		
		<div class="tableScrollSm" style="padding-top: 0px;margin-left: 40px;overflow: auto;height: 500px;width: 836px;">
		   			        	
		        	<table cellpadding="0" class="tableHead">	
		        	<thead>	                    
		                  <tr>
				                <th><p style="width: 100px"><spring:message code="production_process_name" /></p></th>
				                <th><p style="width: 80px"><spring:message code="production_process_picture" /></p></th>
				                <th><p style="width: 100px">客户</p></th>
				                <th><p style="width: 100px">品牌</p></th>
				                <th><p style="width: 150px"><spring:message code="production_process_instructions" /></p></th>
				                <th><p style="width: 80px"><spring:message code="production_process_state" /></p></th>
				                <th><p style="width: 100px"><spring:message code="production_process_founder" /></p></th>
				                <th><p style="width: 100px"><spring:message code="production_process_create_date" /></p></th>
		                  </tr>		 
		                  </thead>                   
		            </table>		                 		            		        
                    <table cellpadding="0" class="tablebody" style="margin-top: 36px;">
         		<c:forEach items="${process.processList}" var="processInfo" varStatus="status">
                    <tbody >
                    <tr>                        
                        <td><p style="width: 100px;">${processInfo.name }</p></td>
                        <td><p style="width: 80px;">
		                  <c:if test="${not empty processInfo.nameImagePath}">
		                        <img src="${processInfo.nameImagePath}" style="width: 50px">
		                  </c:if>
		                  <c:if test="${empty processInfo.nameImagePath}">
		                        <img src="${ctxStatic}/images/pic-none.jpg" style="width: 50px">
		                  </c:if>
		                  </p>
		                </td>
		                <td><p style="width: 100px;">${processInfo.ognizationName }</p></td>
		                <td><p style="width: 100px;">${processInfo.brandName }</p></td>
                        <td class="linkBox" onclick="popup('616px','407px','${ctx}/produce/technology/statusmessages?id=${processInfo.id}')"><p style="width: 150px;">${processInfo.instructions }</p></td>                                              
                        <c:if test="${processInfo.state == 1}">
                        <td><p style="width: 80px;">启用</p></td>
                        </c:if>   
                        <c:if test="${processInfo.state == 0}">
                        <td><p style="width: 80px;">停用</p></td>
                        </c:if> 
                        <td><p style="width: 100px;">${processInfo.jbren }</p></td>
                        <td><p style="width: 100px;"><fmt:formatDate value="${processInfo.createTime}" pattern="yyyy-MM-dd" /></p></td>                                                 
                   </tr>
                	</tbody>
                </c:forEach>
                </table>
                <div id="hiddenHtml"></div>
            </div>
		</div>
	  </div>		
	</div>
</div>	
</form>	
</body>
</html>